/*
package NiuKe;

import java.util.Scanner;

*/
/**
 * @Description:
 * @Author: Hanzao
 * @Date: 2022/06/14/14:29
 *//*

class Node {
    int num;
    Node next;

    public Node() {
    }

    public Node(int num) {
        this.num = num;
    }

    public Node(int num, Node next) {
        this.num = num;
        this.next = next;
    }
}

public class HJ51 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNext()){
            int num = scanner.nextInt();
            Node head = new Node(-1);
            Node temp = head;
            for (int i = 0; i < num; i++) {
                temp.next = new Node(scanner.nextInt());
                temp = temp.next;
            }

            int tmp = scanner.nextInt();
            */
/* 输出校验 *//*

            for (int i = 0; i < num - tmp + 1; i++) {
                head = head.next;
            }
            System.out.println(head.num);
            head = null;
        }
    }
}
*/
